//*********************************************************
//
//    Copyright (c) Microsoft. All rights reserved.
//    This code is licensed under the Apache License, Version 2.0.
//    THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
//    ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
//    IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
//    PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
//
//*********************************************************

using System.ComponentModel;
using System.Workflow.ComponentModel;

namespace Microsoft.Research.ScientificWorkflow.Activities
{
    [Name("Container Activity for the Condition activities", "Condition Container")]
    [Description("Maintains a collection of all the condition activities.")]
    [WorkflowCategory("Condition")]
    [HideActivity(true)]
    public class CondContainer : System.Workflow.Activities.SequenceActivity
	{
        public CondContainer()
		{
		}

        public static System.Workflow.ComponentModel.DependencyProperty ResultProperty =
            System.Workflow.ComponentModel.DependencyProperty.Register("Result", typeof(bool), 
            typeof(CondContainer));

        [OutputParam]
        [Name("Result")]
        [Description("Final Result of all the conditions. This sould be bound to the output of the final condition activity")]
        public bool Result
        {
            get { return (bool)GetValue(CondContainer.ResultProperty); }
            set { SetValue(CondContainer.ResultProperty, value); }
        }

        protected override ActivityExecutionStatus Execute(ActivityExecutionContext executionContext)
        {
            return base.Execute(executionContext);
        }

	}
}
